import 'package:flutter/material.dart';

class SingleScroll extends StatelessWidget {
  const SingleScroll({super.key});

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      scrollDirection: Axis.vertical, // 垂直滚动
      physics: const BouncingScrollPhysics(), // 弹性滚动
      child: Column(
        children: [
          Container(
            height: 100,
            color: Colors.red,
          ),
          Container(
            height: 100,
            color: Colors.orange,
          ),
          Container(
            height: 100,
            color: Colors.yellow,
          ),
          Container(
            height: 100,
            color: Colors.green,
          ),
          Container(
            height: 100,
            color: Colors.blue,
          ),
          Container(
            height: 100,
            color: Colors.purple,
          ),
          Container(
            height: 100,
            color: Colors.pink,
          ),
          Container(
            height: 100,
            color: Colors.brown,
          ),
          Container(
            height: 100,
            color: Colors.grey,
          ),
          Container(
            height: 100,
            color: Colors.black,
          ),
        ],
      ),
    );
  }
}
